from Base import message, intersect, SS_VALID
from DRG import MDCE_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["32.0901","32.0902","32.2903","32.2905","32.3001","32.3900x003","32.3901","32.3902","32.4100","32.4100x002","32.4101","32.4900x002","32.4900x003","32.4901","32.4902","32.4903","32.5000x001","32.5001","32.5900x001","32.5901","32.6x00x002","32.6x00x004","33.0x00x003","33.0x00x004","33.0x03","33.1x00x003","33.1x04","33.3901","33.3902","33.3903","33.4801","33.4802","33.4803","33.4804","34.0200x003","34.0300x001","34.0301","34.0900x011","34.0901","34.0902","34.0904","34.0905","34.0906","34.4x00x008","34.5100x004","34.5100x005","34.5101","34.5200","34.5903","34.7301","34.7303","34.9901","34.9902","34.9904","34.9905","38.0501","38.0503","38.1500x001","38.1501","38.3500x002","38.3501","40.2902","40.2903","40.2904","40.5900x012","40.5904","40.5905","40.5906","40.5913","40.5914"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合EB1入组条件，匹配规则：主手术匹配')

    if MDCE_DRG.EB19_group(record):
      return 'EB19'
        
    return 'EB1'
  else:
    return ''
    
